<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"    
	  xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    
    <h:body>
    	<ui:composition template="templates/commonLayout.xhtml">
		<link type="text/css" rel="stylesheet" href="#{request.contextPath}/css/gh.css" />   
    	
    		<ui:define name="content">
			<h:form id="form1" styleClass="form">
				<table>
					<tbody>
						<tr>
							<td align="left"><h:outputLabel id="oupUsuario" value="#{msjs.nombreUsuario}"></h:outputLabel></td>
							<td style="width:5px">&nbsp;</td>
							<td>
								<p:inputText id="textId1" value="#{LOGIN.nombreUsuario}" styleClass="inputText" disabled="#{LOGIN.mostrarRoles}"/>
							</td>
						</tr>
						<tr>
							<td align="left"><h:outputLabel id="oupContrasena" value="#{msjs.contrasena}"></h:outputLabel></td>
							<td style="width:5px">&nbsp;</td>
							<td>
								<p:password id="textId2" value="#{LOGIN.contrasena}" styleClass="inputText" disabled="#{LOGIN.mostrarRoles}"/>
							</td>
						</tr>
						<p:messages styleClass="messages" id="messages1" style="color: red"/>
						<tr>
						<td colspan="3">
							<h:commandButton id="btnLogin" value="#{msjs.btnLogin}" type="submit" action="#{LOGIN.verificaLogin}" disabled="#{LOGIN.mostrarRoles}"/>
						</td>
						</tr>
						<f:subview id="seleccionaRol" rendered="#{LOGIN.mostrarRoles}">
						<tr>
							<td align="left"><h:outputLabel id="oupCboRoles" for="cboRoles" value="#{msjs.rol}"></h:outputLabel></td>
							<td style="width:5px">&nbsp;</td>
							<td>
								<h:selectOneMenu id="cboRoles" value="#{LOGIN.rolSeleccionado}" styleClass="inputText">
								<f:selectItem id="noSelected" itemValue="0" itemLabel="#{msjs.seleccionaElemento}"></f:selectItem>
								<f:selectItems id="itemsCboRoles" value="#{LOGIN.roles}"></f:selectItems>
								</h:selectOneMenu>
							</td>
						</tr>
						<tr>
						<td colspan="3">
							<h:commandButton id="btnIbgresar" value="#{msjs.btnIngresar}" type="submit" action="#{LOGIN.menuPrincipal}"/>
						</td>
						</tr>
						</f:subview>
					</tbody>
				</table>
	    		<br/>
	    		
				</h:form>
    		
    		</ui:define>
    	</ui:composition>
    </h:body>

</html>